package es.ull.pfc.server;

import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;

class Validator extends DefaultHandler {
	  public boolean validationError = false;  
	  public SAXParseException saxParseException = null; 
	  public void error(SAXParseException exception) throws SAXException {
	   validationError = true;
	   saxParseException = exception;
	   System.out.println("ERROR:" + exception.getMessage());
	  }     
	  public void fatalError(SAXParseException exception) throws SAXException {
	   validationError = true;	    
	   saxParseException=exception;	
	   System.out.println("FATAL ERROR:" + exception.getMessage());
	  }		    
	  public void warning(SAXParseException exception) throws SAXException {
		  System.out.println("WARNING:" + exception.getMessage());	
	  }	
}
